package com.xiyu.service.enums.market.task;

import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import com.xiyu.service.enums.common.IntArrayValuable;

/**
* 邮件营销任务状态
*/
@Getter
@AllArgsConstructor
public enum MarketTaskStatusEnum implements IntArrayValuable {

    /**
    * 草稿
    */
    DRAFT(6, "草稿"),
    /**
    * 待执行
    */
    UNEXECUTED(1, "待执行"),
    /**
    * 执行中
    */
    EXECUTING(2, "执行中"),
    /**
    * 完成
    */
    DONE(3, "完成"),
    /**
    * 发送失败
    */
    FAIL(4, "发送失败"),
    /**
    * 已取消
    */
    CANCEL(5, "已取消");

    private final Integer value;

    private final String label;

    public static final int[] VALUES = Arrays.stream(values()).mapToInt(MarketTaskStatusEnum::getValue).toArray();

    @Override
    public int[] getValues() { return VALUES;}

    public static final String[] LABELS = Arrays.stream(values()).map(MarketTaskStatusEnum::getLabel).toArray(String[]::new);

    @Override
    public String[] getLabels() { return LABELS; }

}
